package com.hwh.service.emp.impl;

import com.hwh.DAO.emp.AdminDAO;
import com.hwh.model.emp.Admin;
import com.hwh.service.emp.AdminService;

public class AdminServiceImpl implements AdminService {
	private AdminDAO adminDAO;
	public AdminDAO getAdminDAO() {
		return adminDAO;
	}
	public void setAdminDAO(AdminDAO adminDAO) {
		this.adminDAO = adminDAO;
	}
	private Admin admin;
	private boolean b = false;
	public boolean checkLogin(String username, String password) {
		// TODO Auto-generated method stub
		System.out.println("amdinService");
		admin = adminDAO.findById(username);
		System.out.println("admin:"+admin.getUserName());
		b = admin.getUserName().equals(username)&&admin.getPassword().trim().equals(password);
		System.out.println("adminService-b:"+b);
		return b;
	}

}
